<?php
namespace Home\Controller;
use Think\Controller;
use Think\Page;
class CommonController extends Controller {
    //利用钩子来判断是否登录
    public function _initialize(){
     
	      	 if(empty($_SESSION['users'])){
	      	
	          		$this->error('抱歉你没登录',U('home/login/index'));
	      	 }
      
     
          
    }
    
}